package com.molyfun.parents.activity.course.bean;

import android.os.Parcel;

import com.molyfun.parents.rest.bean.MediaobjectlistBean;

/**
 * Created by william(liuchao.hit@gmail.com).
 * Date:11/4/16.
 */
public class CourseMediaBean extends MediaobjectlistBean {

//    "url": "http://oa91iwip0.bkt.clouddn.com/helloimg/gallery/20160720102037aMkgOJbd.jpg?imageMogr2/thumbnail/300x300",
//            "type": "1",
//            "bigurl": "http://oa91iwip0.bkt.clouddn.com/helloimg/gallery/20160720102037aMkgOJbd.jpg?imageMogr2/thumbnail/1280x1280",
//            "smallurl": "http://oa91iwip0.bkt.clouddn.com/helloimg/gallery/20160720102037aMkgOJbd.jpg?imageMogr2/thumbnail/100x100",
//            "courseid": "8a2d926357410d3901574c10e9540829",
//            "galleryname": "找相同卡-热狗",
//            "isgame": null,
//            "imgurl": null,
//            "gameid": null,
//            "offlineurl": null
    private String courseid;
    private String galleryname;
    private String isgame;
    private String gameid;
    private String offlineurl;
    //本地使用，用于传递状态
    private boolean isOffLineMode = false;

    public String getCourseid() {
        return courseid;
    }

    public void setCourseid(String courseid) {
        this.courseid = courseid;
    }

    public String getGalleryname() {
        return galleryname;
    }

    public void setGalleryname(String galleryname) {
        this.galleryname = galleryname;
    }

    public String getIsgame() {
        return isgame;
    }

    public void setIsgame(String isgame) {
        this.isgame = isgame;
    }

    public String getGameid() {
        return gameid;
    }

    public void setGameid(String gameid) {
        this.gameid = gameid;
    }

    public String getOfflineurl() {
        return offlineurl;
    }

    public void setOfflineurl(String offlineurl) {
        this.offlineurl = offlineurl;
    }

    public boolean isOffLineMode() {
        return isOffLineMode;
    }

    public void setIsOffLineMode(boolean isOffLineMode) {
        this.isOffLineMode = isOffLineMode;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeString(this.courseid);
        dest.writeString(this.galleryname);
        dest.writeString(this.isgame);
        dest.writeString(this.gameid);
        dest.writeString(this.offlineurl);
        dest.writeByte(this.isOffLineMode ? (byte) 1 : (byte) 0);
    }

    public CourseMediaBean() {
    }

    protected CourseMediaBean(Parcel in) {
        super(in);
        this.courseid = in.readString();
        this.galleryname = in.readString();
        this.isgame = in.readString();
        this.gameid = in.readString();
        this.offlineurl = in.readString();
        this.isOffLineMode = in.readByte() != 0;
    }

    public static final Creator<CourseMediaBean> CREATOR = new Creator<CourseMediaBean>() {
        @Override
        public CourseMediaBean createFromParcel(Parcel source) {
            return new CourseMediaBean(source);
        }

        @Override
        public CourseMediaBean[] newArray(int size) {
            return new CourseMediaBean[size];
        }
    };
}
